package com.test;

import java.util.ArrayList;
import java.util.List;

import com.testDemo.utils.TestUtils;

/**
 * 每个元素的实体
 * 
 * @author Administrator
 */
public class Element {

    private String elementName;
    private String fatherNodeName;
    private String checkType;
    private String elementType;
    private String explan;
    private List<Element> childElements = new ArrayList<Element>();
    private String htmlContent; // 该节点的html格式
    private boolean isFatherNode = false;// 默认不是父节点

    public Element() {

    }

    public Element(String elementName, String fatherNodeName, String checkType, String elementType, String explan,
            List<Element> childElements) {
        super();
        this.elementName = elementName;
        this.fatherNodeName = fatherNodeName;
        this.checkType = checkType;
        this.elementType = elementType;
        this.explan = explan;
        if (!TestUtils.isEmpty(childElements)) {
            this.childElements = childElements;
        }
    }

    public boolean isFatherNode() {
        return isFatherNode;
    }

    public void setFatherNode(boolean isFatherNode) {
        this.isFatherNode = isFatherNode;
    }

    public String getHtmlContent() {
        return htmlContent;
    }

    public void setHtmlContent(String htmlContent) {
        this.htmlContent = htmlContent;
    }

    public String getElementName() {
        return elementName;
    }

    public void setElementName(String elementName) {
        this.elementName = elementName;
    }

    public String getFatherNodeName() {
        return fatherNodeName;
    }

    public void setFatherNodeName(String fatherNodeName) {
        this.fatherNodeName = fatherNodeName;
    }

    /**
     * 是否必选标识 Y,N,*,+
     */
    public String getCheckType() {
        return checkType;
    }

    /**
     * 是否必选标识 Y,N,*,+
     */
    public void setCheckType(String checkType) {
        this.checkType = checkType;
    }

    public String getElementType() {
        return elementType;
    }

    public void setElementType(String elementType) {
        this.elementType = elementType;
    }

    public String getExplan() {
        return explan;
    }

    public void setExplan(String explan) {
        this.explan = explan;
    }

    public List<Element> getChildElements() {
        return childElements;
    }

    public void setChildElements(List<Element> childElements) {
        this.childElements = childElements;
    }

    @Override
    public String toString() {
        return "Element [elementName=" + elementName + ", fatherNodeName=" + fatherNodeName + ", checkType="
                + checkType + ", elementType=" + elementType + ", explan=" + explan + ", childElements="
                + childElements + ", htmlContent=" + htmlContent + ", isFatherNode=" + isFatherNode + "]";
    }

}
